<%-- 
    Document   : registr
    Created on : 6-giu-2010, 0.07.56
    Author     : vito
--%>
<%
            if (session.isNew() == true || session.getAttribute("user") == null) {
                session.setAttribute("error", "pagina disponibile solo per gli utenti registrati");
                response.sendRedirect("./error.jsp");
            }
%>
<%@page contentType="text/html" pageEncoding="UTF-8" import="Other.Constant, Entity.Utente"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<%@ page import="Entity.Utente" %>
<%@ page import="ctrl.Vario" %>


<% Utente u = (Utente) session.getAttribute("user");%>
<html>
    <head>
        <link rel="stylesheet" type="text/css" href="./css/style2.css" media="screen">
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Modifica Utente</title>
    </head>
    <body>
        <div id="wrapper">

            <div id="header">
                <div id="logo">
                    <h1>holydaysrooms</h1>
                </div>
            </div>
            <!-- end #header -->
            <div id="page">
                <div id="page-bgtop">
                    <div id="page-bgbtm">
                        <div id="content">

                            <h1>Pagina di registrazione</h1>
                            <br>
                            <form action="./Servlet">
                                <table border="0">
                                    <tr>
                                        <td>Nome:</td>
                                        <td><input type="text" name="nome" value="<%= u.getNome()%>"></td>
                                        <td>Cognome:</td>
                                        <td><input type="text" name="cognome" value="<%= u.getCognome()%>"></td>
                                    </tr>
                                    <tr>
                                        <td>Indirizzo:</td>
                                        <td><input type="text" name="indirizzo" value="<%= u.getIndirizzo()%>"></td>
                                        <td>Città:</td>
                                        <td><input type="text" name="citta" value="<%= u.getCitta()%>"></td>
                                    </tr>
                                    <tr>
                                        <td>Provincia:</td>
                                        <td><input type='text' name='provincia' value="<%= u.getProvincia()%>"></td>
                                        <td>Regione:</td><td>
                                            <input type='text' name='regione' value="<%= u.getRegione()%>"></td>
                                    </tr>
                                    <tr><td>Stato:</td>
                                        <td><input type='text' name='stato' value="<%= u.getStato()%>">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>Data di nascita:</td>
                                        <td> </td>
                                        <td></td>
                                        <td></td>
                                    </tr>
                                    <tr>
                                        <td> Giorno:</td>
                                        <td><select name="giorno">
                                                <%= Vario.giorni(u.getDatanascita().get(u.getDatanascita().DAY_OF_MONTH))%>
                                            </select></td>
                                        <td></td>
                                        <td></td>
                                    </tr>
                                    <tr>
                                        <td>Mese:</td>
                                        <td><select name="mese">
                                                <%= Vario.mesi(u.getDatanascita().get(u.getDatanascita().MONTH)) %>
                                            </select></td>
                                        <td>Anno:</td>
                                        <td><select name="anno">
                                                <%= Vario.anni(u.getDatanascita().get(u.getDatanascita().YEAR))%>
                                            </select></td>
                                    </tr>
                                    <tr>
                                        <td>Codice Fiscale:</td>
                                        <td><input type="text" name="codiceFiscale" value="<%= u.getCodicefiscale()%>"></td>
                                        <td></td>
                                        <td></td>
                                    </tr>
                                    <tr>
                                        <td>Username:</td>
                                        <td><input type="text" name="username" value="<%= u.getUsername()%>"></td>
                                        <td>Password:</td>
                                        <td><input type="text" name="password" value="<%= u.getPassword()%>"><input type="text" name="pwd2" value="<%= u.getPassword()%>"></td>
                                    </tr>
                                    <tr>
                                        <td>Email:</td>
                                        <td><input type="text" name="email" value="<%= u.getEmail()%>">
                                            <input type="hidden" name="id" value="<%= u.getId()%>">
                                            <input type="hidden" name="azione" value="<%=Constant.EDITUTENTE%>"></td>
                                    </tr>
                                    <tr>
                                        <td><input type="submit" value="invia"></td>
                                    </tr>
                                </table>
                            </form>
                            <div style="clear: both;">&nbsp;</div>
                        </div>
                        <%@include file="/WEB-INF/jspf/menu.jspf" %>
                    </div>
                </div>
            </div>
            <!-- end #page -->

        </div>
        <div id="footer">
            <p>Copyright (c) 2010 www.holydaysrooms.com. All rights reserved. Design by <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>.</p>
        </div>
        <!-- end #footer -->
    </body>

</html>
